function [imeta_data]=filter_eye_monitor_data(imeta_data)
% this function removes glitches in real time eye position detection based
% on the idea that the radius of the pupil should not change more than x
% pixels between frames

dr_thresh=5;
glitch_ind=find(abs(diff(imeta_data(9,:)))>dr_thresh)+1;
imeta_data(7:9,glitch_ind)=NaN;
glitch_ind=imeta_data(9,:)==-1;
imeta_data(7:9,glitch_ind)=NaN;




